package com.lsl.builder_pattern.example.example3;


import com.lsl.builder_pattern.example.example3.concretebuilder.DevilBuilder;
import com.lsl.builder_pattern.example.example3.director.ActorController;
import com.lsl.builder_pattern.example.example3.product.Actor;

/**
 * description:通过钩子方法来控制产品的构建
 *
 * @author: liushengli
 * data: 2022/12/15
 */
public class Client {

    public static void main(String args[]) {
        ActorController ac = new ActorController();

        Actor actor = ac.construct(new DevilBuilder()); //通过指挥者创建完整的建造者对象

        String type = actor.getType();

        System.out.println(type + "的外观：");

        System.out.println("发型：" + actor.getHairstyle());

        System.out.println("性别：" + actor.getSex());

        System.out.println("面容：" + actor.getFace());

        System.out.println("服装：" + actor.getCostume());
    }
}
